Skip to main content

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 Customer IDs to Stripe Customer objects.
  • Transactions: Orchestrates Checkout Sessions for purchases.
  • Webhooks: Listens for Stripe events (e.g., invoice.payment_succeeded, customer.subscription.deleted) to trigger internal license renewals or revocations.

Connector Sync Actions

DirectionEntity Sync'dSummaryTriggerPrimary Code Modules
InboundStripe EventMSA/LicenseProcesses webhooks (payments, subs) to update license states.Automatic (Webhook)StripeService.java
OutboundCustomerStripe CustomerSynchronizes customer metadata to Stripe for billing.Automatic (Checkout)StripeService.java
OutboundOrderStripe CheckoutInitiates secure checkout sessions for purchases.User ActionStripeService.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-msa when 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.