Convex component that integrates Stancer payments with callback-driven status sync, eliminating webhooks and customer portal complexity.
npm install convex-stancerThe Stancer component provides payment processing integration for Convex applications using callback-based status synchronization instead of webhooks. It manages customers, payment intents, and payment status tracking through Convex tables, with explicit sync calls after payment completion. The component handles the complete payment flow from intent creation to status updates via Stancer's redirect-based payment system.
Use convex-stancer to create payment intents server-side with StancerPayments class, redirect users to Stancer's payment URL, then sync payment status after callback. The component handles customer creation and payment tracking automatically.
The convex-stancer component uses callback-driven status sync instead of webhooks. After payment completion, Stancer redirects to your callback URL where you call syncPaymentIntentStatus to update Convex tables with the latest payment status.
Access payment information through built-in public queries like getPaymentIntent, listPaymentsByUserId, getCustomerByEmail, and listSubscriptionsByOrgId. The component provides comprehensive read access to all payment-related data.
No, convex-stancer uses a callback-driven approach instead of webhooks. After payment completion, Stancer redirects users back to your app where you explicitly sync payment status using the syncPaymentIntentStatus method.
No, the StancerPayments class is server-only and must be used in Convex actions or other trusted server runtimes. The component explicitly rejects browser runtimes to prevent leaking your STANCER_API_KEY.
convex-stancer requires explicit sync calls after payment callbacks. When Stancer redirects back to your app, call syncPaymentAfterCallback with the paymentIntentId to fetch the latest status and update your Convex tables.
convex-stancer requires STANCER_API_KEY (your secret key starting with stest_ or sprod_) and APP_URL (your frontend base URL for return_url callbacks). Configure these in your Convex Dashboard.