Payments Module
Primus Payments focuses on webhook validation and event handling. It does not process charges or manage subscriptions directly.
Data Isolation
Webhook validation happens locally using your provider's signing secrets. No payment data is transmitted to Primus servers.
Key Capabilities
- Webhook signature validation with cryptographic verification
- Typed event parsing for subscriptions, invoices, and payments
- Built-in idempotency and event deduplication hooks
Supported Providers
Stripe
Webhook validation and event parsing.
WebhooksEvents
PayPal
Webhook signature verification via PayPal API.
WebhooksEvents
Packages
| Platform | Package | Version |
|---|---|---|
| .NET | PrimusSaaS.Payments | 2.0.0 |
| Node.js | @primus-saas/payments | 1.0.0 |
Supported Events (Stripe)
| Stripe Event | Typed Event |
|---|---|
customer.subscription.created | SubscriptionCreatedEvent |
customer.subscription.updated | SubscriptionUpdatedEvent |
customer.subscription.deleted | SubscriptionCancelledEvent |
payment_intent.succeeded | PaymentSucceededEvent |
payment_intent.payment_failed | PaymentFailedEvent |
invoice.paid | InvoicePaidEvent |
invoice.payment_failed | InvoicePaymentFailedEvent |
customer.created | CustomerCreatedEvent |
customer.updated | CustomerUpdatedEvent |
customer.deleted | CustomerDeletedEvent |
Supported Events (PayPal)
| PayPal Event | Typed Event |
|---|---|
BILLING.SUBSCRIPTION.CREATED | SubscriptionCreatedEvent |
BILLING.SUBSCRIPTION.UPDATED | SubscriptionUpdatedEvent |
BILLING.SUBSCRIPTION.CANCELLED | SubscriptionCancelledEvent |
PAYMENT.SALE.COMPLETED | PaymentSucceededEvent |
PAYMENT.CAPTURE.COMPLETED | PaymentSucceededEvent |
PAYMENT.CAPTURE.DENIED | PaymentFailedEvent |
PAYMENT.CAPTURE.REFUNDED | PaymentFailedEvent |
INVOICING.INVOICE.PAID | InvoicePaidEvent |
INVOICING.INVOICE.PAYMENT_FAILED | InvoicePaymentFailedEvent |
Roadmap
- Subscription management helpers
Next Steps
| Want to... | See Guide |
|---|---|
| Integrate Stripe | Stripe Integration |
| Subscription webhooks | Subscriptions |