Stripe Connector
Overview
The Stripe Connector handles all credit card processing and subscription billing events. It acts as the gateway for secure payments, ensuring that financial transactions are processed safely and that license states are updated upon successful payment.
Data Synchronization Flow
- Customer Data: Maps SureInk
CustomerIDs to StripeCustomerobjects. - Transactions: Orchestrates
Checkout Sessionsfor purchases. - Webhooks: Listens for Stripe events (e.g.,
invoice.payment_succeeded,customer.subscription.deleted) to trigger internal license renewals or revocations.
Connector Sync Actions
| Direction | Entity Sync'd | Summary | Trigger | Primary Code Modules |
|---|---|---|---|---|
| Inbound | Stripe Event → MSA/License | Processes webhooks (payments, subs) to update license states. | Automatic (Webhook) | StripeService.java |
| Outbound | Customer → Stripe Customer | Synchronizes customer metadata to Stripe for billing. | Automatic (Checkout) | StripeService.java |
| Outbound | Order → Stripe Checkout | Initiates secure checkout sessions for purchases. | User Action | StripeService.java |
Major Code Modules (com.sureink.connector.external.payment.stripe)
StripeChargeController: Handles initial payment requests and session initiation.service:- Stripe Webhook Processing: Consumes events from the Stripe API to update local database states.
- Refund Management: Logic for processing partial or full refunds.
StripeClient: Wrapper around the official Stripe Java SDK for standard platform operations.
Linkages and References
- Frontend: Injected into the Angular UI during the checkout process.
- Core Systems: Updates
sureink-cloud-msawhen payments are confirmed. - Security: Validates Stripe webhook signatures using
STRIPE_ENDPOINT_SECRET_KEY.
External References
Glossary
- API: Application Programming Interface - A set of definitions and protocols for building and integrating application software.
- DTO: Data Transfer Object - An object that carries data between processes.
- MSA: Master Subscription Agreement - The primary contract governing the relationship between the platform provider and the subscriber.
- SDK: Software Development Kit - A collection of software development tools in one installable package.
- UI: User Interface - The space where interactions between humans and machines occur.